type Vue = "vue";

type Plugin2<Options> = Options extends unknown[]
  ? {
      install: (Vue: Vue, ...options: Options) => any;
    }
  : {
      install: (Vue: Vue, options: Options) => any;
    };

function myUse<T>(plugin: Plugin2<T>, options: T): any;
function myUse<T extends unknown[]>(plugin: Plugin2<T>, ...options: T): any;
function myUse(plugin: any, ...options: any) {
  const Vue = "vue";
  plugin.install(Vue, ...options);
}

myUse(
  {
    install(Vue, c1) {
      console.log(c1);
    },
  },
  {
    name: "zs",
  }
);
